package cn.yuitstyle.excel;


import cn.yuitstyle.excel.annotation.*;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ExcelDTO {

    @ExcelProperty(value = "序号", index = 0)
    private String id;

    @ExcelProperty(value = "姓名", index = 1)
    @ExcelNotNull(message = "姓名不可以为空")
    private String name;

    @ExcelProperty(value = "身份证", index = 2)
    @ExcelLength(min = 18, max = 18, message = "身份证号18位")
    private String idCard;

    @ExcelMax(value = 150, message = "年龄不可以超过150岁")
    @ExcelMin(value = 0)
    @ExcelProperty(value = "年龄", index = 3)
    private Integer age;


    @ExcelProperty(value = "身高", index = 1)
    @ExcelDigitPattern(message = "身高格式不对")
    private BigDecimal height;
}
